package com.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import redis.clients.jedis.JedisCluster;

/**
 * @author root
 * @description TODO
 * @date 2020/12/3 16:00
 */
@RestController
public class TestController {

    @Autowired
    private JedisCluster jedisCluster;


    @GetMapping("test1")
    public Object test(){
        jedisCluster.set("ok", "Hello World");
        return jedisCluster.get("ok");
    }
}
